#ifndef YCEXTENSIONDECLARATIONLIST_H
#define YCEXTENSIONDECLARATIONLIST_H
#include "extensiondeclaration.h"
#include <QList>

namespace yc {

class YCEXTENSIONSHARED_EXPORT ExtensionDeclarationList
{
public:
    ExtensionDeclarationList();

    const QList<ExtensionDeclaration>& declarations() const { return declarations_; }
    void setDeclarations(const QList<ExtensionDeclaration>& declarations)
    {
        declarations_ = declarations;
    }

    bool empty() const { return declarations_.empty(); }
    bool contains(const QString& type) const;
    void add(const ExtensionDeclaration& decl) { declarations_.push_back(decl); }
    ExtensionDeclaration find(const QString& type) const;

private:
    QList<ExtensionDeclaration> declarations_;
};

} // namespace yc

#endif // YCEXTENSIONDECLARATIONLIST_H
